const paramsoption = {
  state: {
    activeOption: ['平台','活动id','活动分类','活动名称','活动编号','活动时间','全部状态','参与人数/最大限制','奖品/商品详情','智能防刷','创建时间','创建人'],
    activelogOption:['ID','openid','活动ID','活动名称','访问次数','头像','昵称','IP','最近访问时间'],
    memberOption:['ID','用户名','会员等级','手机号','余额','开通时间','有效期','登录时间','注册时间','渠道','状态','活动数量'],
    qudaoOption:['ID','类型','名称','排序','状态'],
    fundOption:['ID','会员ID','用户名称','平台','变更金额','订单号','商品','创建时间'],
    recordOption:['ID','状态','订单号','会员','昵称','金额','到账金额','支付平台','支付单号','支付时间','备注','添加时间'],
    adminOption:['ID','用户名','昵称','所属级别','Email','状态','最后登录'],
    templateOption:['ID','预览图','模板名称','模板类型','使用次数','分类名称','排序','显示模板'],
    bgmaterialOption:['ID','素材分类','素材名称','图片','排序','显示素材'],
    complainOption:['平台','活动ID','活动分类','活动名称','活动编号','活动时间','投诉类型','投诉内容','联系电话','备注','投诉时间'],
  },
  mutations: {
    SET_ACTIVEOPTION: (state, option) => {
      state.activeOption = option
      localStorage.setItem('activeOption',JSON.stringify(option));
    },

    SET_ACTIVELOGOPTION: (state, option) => {
      state.activelogOption = option
      localStorage.setItem('activelogOption',JSON.stringify(option));
    },
    
    SET_MEMBEROPTION: (state, option) => {
      state.memberOption = option
      localStorage.setItem('memberOption',JSON.stringify(option));
    },

    SET_QUDAOOPTION: (state, option) => {
      state.qudaoOption = option
      localStorage.setItem('qudaoOption',JSON.stringify(option));
    },

    SET_FUNDOPTION: (state, option) => {
      state.fundOption = option
      localStorage.setItem('fundOption',JSON.stringify(option));
    },
    // 充值记录
    SET_RECORDOPTION: (state, option) => {
      state.recordOption = option
      localStorage.setItem('recordOption',JSON.stringify(option));
    },

    SET_ADMINOPTION: (state, option) => {
      state.adminOption = option
      localStorage.setItem('adminOption',JSON.stringify(option));
    },

    SET_TEMPLATEOPTION: (state, option) => {
      state.templateOption = option
      localStorage.setItem('templateOption',JSON.stringify(option));
    },
    // 背景素材
    SET_BGMATERIALOPTION: (state, option) => {
      state.bgmaterialOption = option
      localStorage.setItem('bgmaterialOption',JSON.stringify(option));
    },
    SET_COMPLAINOPTION: (state, option) => {
      state.complainOption = option
      localStorage.setItem('complainOption',JSON.stringify(option));
    },
  },
  actions: {
    // // 生成路由
    // GenerateRoutes({ commit }) {
    //   return new Promise(resolve => {
    //     // 向后端请求路由数据
    //     getRouters().then(res => {
    //       const sdata = JSON.parse(JSON.stringify(res.data))
    //       const rdata = JSON.parse(JSON.stringify(res.data))
    //       const sidebarRoutes = filterAsyncRouter(sdata)
    //       const rewriteRoutes = filterAsyncRouter(rdata, false, true)
    //       const asyncRoutes = filterDynamicRoutes(dynamicRoutes);
    //       rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true })
    //       router.addRoutes(asyncRoutes);
    //       commit('SET_ROUTES', rewriteRoutes)
    //       commit('SET_SIDEBAR_ROUTERS', constantRoutes.concat(sidebarRoutes))
    //       commit('SET_DEFAULT_ROUTES', sidebarRoutes)
    //       commit('SET_TOPBAR_ROUTES', sidebarRoutes)
    //       resolve(rewriteRoutes)
    //     })
    //   })
    // }
  }
}
export default paramsoption
